package com.kaifa.test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ListDemo {
    public static void main(String[] args) {
//        有序集合
        List<String> list = new ArrayList<>();
        list.add("你好");
        list.add("123");
        list.add("234");
        list.add("redgf");
        System.out.println(list);
        System.out.println(list.size());
        System.out.println(list.isEmpty());
        String str = list.get(2);
        System.out.println(str);

        List<Map<String,String>> list2 = new ArrayList<>();
        Map<String,String> map = new HashMap<>();
        map.put("name","姓名");
        map.put("sex","性别");
        list2.add(map);

        Map<String,String> map2 = new HashMap<>();
        map2.put("name2","姓名2");
        map2.put("sex2","性别2");
        list2.add(map2);
        System.out.println(list2);












    }




}
